@extends('system.frame_layout')
<?php
$parent_menu = "关于我们";
if ($flag == 0) {
    $menu_selected = "新闻动态";
} elseif ($flag == 1) {
    $menu_selected = "系统公告";
}
?>

@section('content')
    <div id="content-panel">
        <div class="row">
            <div class="col-xs-12">
                <div class="portlet light bordered">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-social-dribbble font-dark hide"></i>
                            <span class="caption-subject font-dark bold">{{$menu_selected}}</span>
                        </div>
                    </div>
                    <div class="portlet-body">
                        <!-- BEGIN: Actions -->
                        @foreach($notices as $notice)
                            <div class="mt-actions">
                            <div class="mt-action">
                                <div class="mt-action-body">
                                    <div class="mt-action-row">
                                        <div class="mt-action-info ">
                                            <div class="mt-action-icon ">
                                                <i class="iconfont icon-gonggao"></i>
                                            </div>
                                            <div class="mt-action-details ">
                                                <span class="mt-action-author">{{$notice->title}}</span>
                                                <p class="mt-action-desc">点击右侧阅读按钮，可查看公告详情！</p>
                                            </div>
                                        </div>
                                        <div class="mt-action-datetime ">
                                            <span class="mt-action-date">{{date("Y-m-d",$notice->time)}}</span>
                                            <span class="mt-action-dot bg-green"></span>
                                            <span class="mt=action-time">{{date("H:i",$notice->time)}}</span>
                                        </div>
                                        <div class="mt-action-buttons ">
                                            <div >
                                                <button type="button"
                                                        onclick="contentDlg({{$flag}},{{$notice->id}})"
                                                        class="btn btn-outline green btn-sm">
                                                    阅读
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                        </div>
                        <!-- END: Actions -->
                       @include('system.coms.fenye')
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('footer')
    @include('system.coms.content-dialog')
@endsection